import { defineComponent, reactive, getCurrentInstance, onMounted, toRefs, computed } from 'vue'
import { useStore } from 'vuex'

export default{
    authMenu: function(currentRouter){
        let menuCurry = [];
        const store = useStore();
        let menuData = JSON.parse(localStorage.getItem('menuData'));
        for (let key in menuData) {
            let menuSub = menuData[key].children;
            for (let index in menuSub) {
                if(currentRouter == menuSub[index].path){
                    let children = menuSub[index].children;
                    for(let i in children){
                        menuCurry.push(children[i].path);
                    }
                    
                }            
            }
        }
        return String(menuCurry);
    }
}